package com.eshop.modules.product.service;

import com.eshop.modules.product.service.dto.StoreProductDto;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.eshop.modules.product.service.dto.YxStoreProductDto;
import org.springframework.data.domain.Pageable;
import com.eshop.modules.product.service.dto.StoreProductQueryCriteria;
import com.eshop.modules.product.vo.ProductVo;
import java.util.Map;
import java.util.List;
import com.eshop.modules.product.param.StoreProductQueryParam;
import com.eshop.modules.product.vo.StoreProductQueryVo;
import com.eshop.modules.product.domain.StoreProduct;
import com.eshop.common.service.BaseService;

public interface StoreProductService extends BaseService<StoreProduct>
{
    void incProductStock(final Integer num, final Long productId, final String unique, final Long activityId, final String type);
    
    void decProductStock(final int num, final Long productId, final String unique, final Long activityId, final String type);
    
    StoreProduct getProductInfo(final Long id);
    
    StoreProductQueryVo getStoreProductById(final Long id);
    
    int getProductStock(final Long productId, final String unique, final String type);
    
    List<StoreProductQueryVo> getGoodsList(final StoreProductQueryParam productQueryParam);
    
    Map<String, Object> getGoodsListByPage(final StoreProductQueryParam productQueryParam);
    
    ProductVo goodsDetail(final Long id, final Long uid, final String latitude, final String longitude);
    
    void incBrowseNum(final Long productId);
    
    List<StoreProductQueryVo> getList(final int page, final int limit, final int order);
    
    Map<String, Object> queryAll(final StoreProductQueryCriteria criteria, final Pageable pageable);
    
    List<StoreProduct> queryAll(final StoreProductQueryCriteria criteria);
    
    void download(final List<YxStoreProductDto> all, final HttpServletResponse response) throws IOException;
    
    void onSale(final Long id, final Integer status);
    
    Map<String, Object> getFormatAttr(final Long id, final String jsonStr, final boolean isActivity);
    
    void insertAndEditYxStoreProduct(final StoreProductDto storeProductDto);
    
    void deleteForwardImg(final Long id);
}
